package com.cv.platform.controller.platform.comment;

import com.cv.framework.common.pojo.Result;
import com.cv.platform.service.comment.CvCommentDislikeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 视频平台 - 视频评论踩控制层
 *
 * @author Charles_XDXD
 */
@Tag(name = "视频平台 - 视频评论踩控制层")
@RestController
@RequestMapping("/platform/video/comment/dislike")
public class CvCommentDislikeController {

    @Resource
    private CvCommentDislikeService commentDislikeService;

    @PostMapping("save")
    @Operation(summary = "保存踩视频评论")
    public Result<Void> saveCommentDislike(Long commentId) {
        commentDislikeService.saveCommentDislike(commentId);
        return Result.success();
    }

    @DeleteMapping("cancel")
    @Operation(summary = "取消踩视频评论")
    public Result<Void> cancelCommentDislike(Long commentId) {
        commentDislikeService.cancelCommentDislike(commentId);
        return Result.success();
    }

}
